package com.easy.admin.system.task;

import com.easy.admin.system.websocket.WebSocketServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@EnableScheduling
@Component
public class LoginTask {
    @Autowired
    private WebSocketServer webSocketServer;
    @Scheduled(cron = "*/5 * * * * ?")
    public void loginTask(){
        webSocketServer.sendMessage("");
    }
}


